// 导入axios工具包
import instance from '@/utils/axios.js'
// 获取频道列表
const getChannels = () => {
    return instance({
        url: '/v1_0/user/channels',
        method: 'get',
    })
}
// 导出接口
export { getChannels }

// 获取文章列表
const getArticles = ({ channel_id, timestamp }) => {
    return instance({
        url: '/v1_1/articles',
        method: 'get',
        params: {
            with_top: 1,
            channel_id,
            timestamp
        }
    })
}
// 导出接口
export { getArticles }

//获取文章详细信息
const getArticleInfo = ({ id }) => {
    return instance({
        url: '/v1_0/articles/' + id,
        method: 'get'
    })
}
//  导出接口
export { getArticleInfo }